#include <iostream>
#include "vectorfunctions.h"
int sequence(int x[], int l, int temp[])
{
	int i, n, j, k, aux, max=0;
	for(i=0; i<l; ++i){
		aux=x[i];
		n=0;
		j=i+1;
		while(aux==x[j]){
			++n;
			i=j;
			++j;	
		}
	
		if (max<n){
			max=n;
			k=0;
			for (j=i-max;j<i+1;j++){
				temp[k]=x[j];
				++k;
			}
		}
	}	
return max+1;			
}

int main()
{
	int l, nl;
	int a[100], temp[100];
	cout<<"Length of array a : ";
	cin>>l;
	readVector(a, l);
	printVector(a, l);
	nl = sequence(a, l, temp);
	printVector(temp, nl);
return 0;
}

